<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>清除浮动</title>
    <style>
        .box1 {
            width: 1300px;
            height: 100px;
            background-color: #eee;
            margin: 20px auto;
        }

        .box2 {
            width: 1300px;
            height: 100px;
            background-color: #eee;
            margin: 20px auto;
        }

        .box3 {
            width: 1300px;
            height: 100px;
            background-color: #eee;
            margin: 20px auto;
        }

        /* 当内部有浮动的时候，一定要写高度 */
        .f_box {
            width: 1300px;
            /* height: 100px; */
            overflow: hidden;   
            background-color: gold;
            margin: 20px auto;
        }

        .f_box .c1 {
            float: left;
            width: 100px;
            height: 100px;
            background-color: blue;
        }

        .f_box .c2 {
            float: left;
            width: 200px;
            height: 100px;
            background-color: green;
        }
    </style>
</head>

<body>
    <!-- 标准流 -->
    <div class="box1">box1</div>
    <!-- 内部有浮动 -->
    <div class="f_box">
        <div class="c1"></div>
        <div class="c2"></div>
    </div>
    <!-- 标准流 -->
    <div class="box2">box1</div>
    <!-- 标准流 -->
    <div class="box3">box1</div>
</body>

</html>